def dynamicPassword(password: str, target: int) -> str:
    if not password or target <= 0:
        return password
    n = len(password)
    target %= n
    return password[target:] + password[:target]